#include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
	int n, fl, flOld, sum;
	while (cin >> n)
	{
		flOld = 0, sum = 0;
		while (n--)
		{
			cin >> fl;
			if (fl > flOld)sum = sum + 6 * (fl - flOld) + 5;
			else if (fl < flOld)sum = sum + 4 * (flOld - fl) + 5;
			else sum += 5;
			flOld = fl;
		}
		cout << sum << endl;
	}
	return 0;
}